// TestSortDlg.h : header file
//

#pragma once
#include "MFCWindowAutoSize.h"
//#include "sortlistctrl.h"

// CTestSortDlg dialog

class CTestSortDlg : public CDialog , public CMFCDialogResize<CTestSortDlg>
{
// Construction
public:
	CTestSortDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_TESTSORT_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
    

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnSize(UINT nType, int cx, int cy);

public:
    BEGIN_DLGRESIZE_MAP(CTestSortDlg)
        DLGRESIZE_CONTROL(IDC_STATIC_COMPARETYPE,DLSZ_SIZE_X)
        DLGRESIZE_CONTROL(IDC_LIST1,DLSZ_SIZE_X|DLSZ_SIZE_Y)
        DLGRESIZE_CONTROL(IDOK,DLSZ_MOVE_X)
        DLGRESIZE_CONTROL(IDCANCEL,DLSZ_MOVE_X)
    END_DLGRESIZE_MAP()
    CListCtrl m_ListCtrl;
    afx_msg void OnBnClickedLoadFile();
    afx_msg void OnHdnItemclickList1(NMHDR *pNMHDR, LRESULT *pResult);
private:
    int m_iNumColumns;
    int m_iSortColumn;
    BOOL m_bSortAscending;
    void Sort( int iColumn, BOOL bAscending );
    static int CALLBACK CompareFunction( LPARAM lParam1, LPARAM lParam2, LPARAM lParamData );
public:
    int m_CompareType;
    afx_msg void OnBnClickedMakeFolder();
    afx_msg void OnBnClickedOpenfolder();
    void ClearMemory();
    afx_msg void OnDestroy();
};
